function WizardNavigate(iNavigateEnum)
{
if( _wizard != null )
{
_wizard.Navigate(iNavigateEnum);
}
}
function WizardSetDialogReturnValue(vReturnValue)
{
if( _wizard != null )
{
_wizard.SetDialogReturnValue(vReturnValue);
}
}
function WizardSetProperty(sPropertyName, vPropertyValue)
{
if( _wizard != null )
{
_wizard.SetProperty(sPropertyName, vPropertyValue);
}
}
function WizardGetProperty(sPropertyName)
{
if( _wizard != null )
{
return _wizard.GetProperty(sPropertyName);
}
}
function WizardHasProperty(sPropertyName)
{
return !IsNull(WizardGetProperty(sPropertyName));
}






function WizardSetButtonText(sDisplayText, sToolTipText, iButton)
{

if(IsNull(sDisplayText))
{
return;
}

var oButtonElement = findButton(iButton);
if(!IsNull(oButtonElement))
{

oButtonElement.value = sDisplayText;
oButtonElement.title = IsNull(sToolTipText) ? "" : sToolTipText;
}
}





function WizardSetButtonEnabled(bEnable, iButton)
{
var oButtonElement = findButton(iButton);
if(!IsNull(oButtonElement))
{
oButtonElement.disabled = !bEnable;
}
}





function WizardSetButtonVisible(bVisible, iButton)
{
var oButtonElement = findButton(iButton);
if(!IsNull(oButtonElement))
{
oButtonElement.style.display = (bVisible) ? "inline" : "none";
}
}




function findButton(iButton)
{
var oButtonElement = null;
switch(iButton)
{
case _WizardButtonsEnum.BACKBUTTON:
oButtonElement = buttonBack;
break;
case _WizardButtonsEnum.CANCELBUTTON:
oButtonElement = buttonCancel;
break;
case _WizardButtonsEnum.NEXTBUTTON:
oButtonElement = buttonNext;
break;
case _WizardButtonsEnum.RESTARTBUTTON:
oButtonElement = buttonRestart;
break;
}
return oButtonElement;
}
var _wizard = WizardFindWizard();
function WizardFindWizard()
{
if( _wizard != null )
{
return _wizard;
}
var currentWindow = window;
var parent = currentWindow.parent;
while(parent.document.all.wizardcontainerpage == null && parent != currentWindow)
{

currentWindow = parent;
parent = currentWindow.parent;
}
if( parent.document.all.wizardcontainerpage != null )
{
_wizard = new parent.window.Wizard();
return _wizard;
}
return null;
}






function NextPageDefinition(sUrl, sDataToPost)
{
this["Url"] = sUrl;
this["DataToPost"] = sDataToPost;
}
